#ifndef DRIVER_H
#define DRIVER_H

#include "wiimote.h"
#include <linux/uinput.h>
#include <linux/input.h>
#include <fcntl.h>
#include <string.h>

class driver{
    public:
        driver();
        ~driver();

        status init_driver();
        status destroy_driver();
        status system_poll();
        void handle_event(struct wiimote_t* wm);
        status pressed(struct wiimote_t* wm);
        status released(struct wiimote_t* wm);
        //status held(struct wiimote_t* wm);

    private:
        wmote wmte;
        int fd;
        struct uinput_user_dev udev;
        struct input_event ev;
        struct input_event xy[2];
};

#endif // DRIVER_H
